const KeyPerfix = "PINIA:";
import { setEncryptedData, getEncryptedData } from "@/utils/Common.js";
export default (context) => {
  const { store } = context;
  const key = KeyPerfix + store.$id;
  store.$subscribe((mutation, state) => {
    setEncryptedData(key, state);
  });
  const item = getEncryptedData(key);
  if (!item) return;
  store.$state = item;
};
